//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - SaaS Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================


//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - S+S Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using Microsoft.Practices.SmartClient.DisconnectedAgent;
using System;
using LitwareHR.Recruiting.Contract;
using Shp.Runtime.Contract;
using LitwareHR.Infrastructure.Interface;

namespace LitwareHR.PublicApp.WinUX.DSA.Secure.ProcessService
{
    // Generated code for the web service.
    // Use this proxy to make requests to the service when working in an application that is occasionally connected
    public class Callback : CallbackBase
    {
        #region Event Handler

        #region OpenRecruitingProcess

        public static event EventHandler<EventArgs<Guid>> OpenRecruitingProcessReturn;
        public static event EventHandler<EventArgs<Exception>> OpenRecruitingProcessException;

        #endregion OpenRecruitingProcess

        #region GetRecruitingWorkflowListByApplicant

        public static event EventHandler<EventArgs<StringPair[][]>> GetRecruitingWorkflowListByApplicantReturn;
        public static event EventHandler<EventArgs<Exception>> GetRecruitingWorkflowListByApplicantException;

        #endregion GetRecruitingWorkflowListByApplicant

        #region GetRecruitingWorkflowList

        public static event EventHandler<EventArgs<StringPair[][]>> GetRecruitingWorkflowListReturn;
        public static event EventHandler<EventArgs<Exception>> GetRecruitingWorkflowListException;

        #endregion GetRecruitingWorkflowList

        #region SubmitResume

        public static event EventHandler<EventArgs> SubmitResumeReturn;
        public static event EventHandler<EventArgs<Exception>> SubmitResumeException;

        #endregion SubmitResume

        #region SubmitInterview

        public static event EventHandler<EventArgs> SubmitInterviewReturn;
        public static event EventHandler<EventArgs<Exception>> SubmitInterviewException;

        #endregion SubmitInterview

        #region SubmitNegotiation

        public static event EventHandler<EventArgs> SubmitNegotiationReturn;
        public static event EventHandler<EventArgs<Exception>> SubmitNegotiationException;

        #endregion SubmitNegotiation

        #region SubmitAcceptance

        public static event EventHandler<EventArgs> SubmitAcceptanceReturn;
        public static event EventHandler<EventArgs<Exception>> SubmitAcceptanceException;

        #endregion SubmitAcceptance

        #region SubmitRejection

        public static event EventHandler<EventArgs> SubmitRejectionReturn;
        public static event EventHandler<EventArgs<Exception>> SubmitRejectionException;

        #endregion SubmitRejection

        #endregion 

        #region OpenRecruitingProcess

        public override void OnOpenRecruitingProcessReturn(Request request, object[] parameters, Guid returnValue)
        {
            if (OpenRecruitingProcessReturn != null)
            {
                OpenRecruitingProcessReturn(this, new EventArgs<Guid>(returnValue));
            }
        }

        public override OnExceptionAction OnOpenRecruitingProcessException(Request request, Exception ex)
        {
            if (OpenRecruitingProcessException != null)
            {
                OpenRecruitingProcessException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion OpenRecruitingProcess

        #region GetRecruitingWorkflowListByApplicant

        public override void OnGetRecruitingWorkflowListByApplicantReturn(Request request, object[] parameters, StringPair[][] returnValue)
        {
            if (GetRecruitingWorkflowListByApplicantReturn != null)
            {
                GetRecruitingWorkflowListByApplicantReturn(this, new EventArgs<StringPair[][]>(returnValue));
            }
        }

        public override OnExceptionAction OnGetRecruitingWorkflowListByApplicantException(Request request, Exception ex)
        {
            if (GetRecruitingWorkflowListByApplicantException != null)
            {
                GetRecruitingWorkflowListByApplicantException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion GetRecruitingWorkflowListByApplicant

        #region GetRecruitingWorkflowList

        public override void OnGetRecruitingWorkflowListReturn(Request request, object[] parameters, StringPair[][] returnValue)
        {
            if (GetRecruitingWorkflowListReturn != null)
            {
                GetRecruitingWorkflowListReturn(this, new EventArgs<StringPair[][]>(returnValue));
            }
        }

        public override OnExceptionAction OnGetRecruitingWorkflowListException(Request request, Exception ex)
        {
            if (GetRecruitingWorkflowListException != null)
            {
                GetRecruitingWorkflowListException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion GetRecruitingWorkflowList

        #region SubmitResume

        public override void OnSubmitResumeReturn(Request request, object[] parameters)
        {
            if (SubmitResumeReturn != null)
            {
                SubmitResumeReturn(this, new EventArgs());
            }
        }

        public override OnExceptionAction OnSubmitResumeException(Request request, Exception ex)
        {
            if (SubmitResumeException != null)
            {
                SubmitResumeException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion SubmitResume

        #region SubmitInterview

        public override void OnSubmitInterviewReturn(Request request, object[] parameters)
        {
            if (SubmitInterviewReturn != null)
            {
                SubmitInterviewReturn(this, new EventArgs());
            }
        }

        public override OnExceptionAction OnSubmitInterviewException(Request request, Exception ex)
        {
            if (SubmitInterviewException != null)
            {
                SubmitInterviewException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion SubmitInterview

        #region SubmitNegotiation

        public override void OnSubmitNegotiationReturn(Request request, object[] parameters)
        {
            if (SubmitNegotiationReturn != null)
            {
                SubmitNegotiationReturn(this, new EventArgs());
            }
        }

        public override OnExceptionAction OnSubmitNegotiationException(Request request, Exception ex)
        {
            if (SubmitNegotiationException != null)
            {
                SubmitNegotiationException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion SubmitNegotiation

        #region SubmitAcceptance

        public override void OnSubmitAcceptanceReturn(Request request, object[] parameters)
        {
            if (SubmitAcceptanceReturn != null)
            {
                SubmitAcceptanceReturn(this, new EventArgs());
            }
        }

        public override OnExceptionAction OnSubmitAcceptanceException(Request request, Exception ex)
        {
            if (SubmitAcceptanceException != null)
            {
                SubmitAcceptanceException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion SubmitAcceptance

        #region SubmitRejection

        public override void OnSubmitRejectionReturn(Request request, object[] parameters)
        {
            if (SubmitRejectionReturn != null)
            {
                SubmitRejectionReturn(this, new EventArgs());
            }
        }

        public override OnExceptionAction OnSubmitRejectionException(Request request, Exception ex)
        {
            if (SubmitRejectionException != null)
            {
                SubmitRejectionException(this, new EventArgs<Exception>(ex));
            }
            return OnExceptionAction.Retry;
        }

        #endregion SubmitRejection

    }
}
